1. Field of the Invention
The present invention relates to a storage controller and a storage controller control method.
2. Description of the Related Art
A storage controller, for example, is connected to a mainframe or other such host computer (hereinafter, “host”). The storage controller provides the host with a storage area based on RAID (Redundant Array of Inexpensive Disks).
In the storage controller, for example, redundancy can also be added to the data as with the well-known RAID 1 through RAID 6. The storage controller prepares for a failure in a disk drive by adding parity to the data, and writing a copy of the data to a different disk drive.
Furthermore, storage controllers that use guarantee codes are also known (Japanese Patent Laid-open No. 2000-347815, U.S. Pat. No. 5,819,054, and U.S. Pat. No. 5,706,298). In one prior art, a logical address (hereinafter, “LA (Logical Address)”) of a logical block specified as the access destination by the host computer, and an LRC (Longitudinal Redundancy Check), which is determined by implementing an Exclusive OR operation on the data in the logical block, are respectively added to the logical block as a guarantee code, and this guarantee code and logical block are saved to a disk drive.
The LA is utilized for detecting an address error in a storage area into which the logical block data has been written. The LRC is utilized as an error detection symbol for detecting a data error in the logical block.
When the above-mentioned guarantee code is added to a logical block, there is a likelihood that the data management unit, which is handled inside the storage controller, will differ from the data management unit inside the disk drive. For example, in a disk drive in which the block length (sector length) is fixed at the size of the logical block, data is stored in logical block units. Therefore, when the block size is increased by adding a guarantee code to the logical block, the disk drive format may make it impossible to store the guarantee code-appended logical block as-is.
Accordingly, to solve for this problem, a fourth Patent Document (Japanese Patent Laid-open No. 2006-195851) proposes a technique for affixing the lowest common multiple of the logical block size and the guarantee code-appended logical block size as a value when inputting/outputting data to/from the disk drive.
As disclosed in the above-mentioned fourth Patent Document (Japanese Patent Laid-open No. 2006-195851), configuring the lowest common multiple for the logical block size and the guarantee code-appended logical block size as the basic unit when the storage controller is writing data to the disk drive makes it possible to write a logical block, to which a guarantee code has been added, to a disk drive having a fixed sector length. Hereinafter, a logical block whose size has been increased by the addition of a guarantee code will be called an extended logical block.
For example, if it is supposed that the size of the logical block is 512 bytes and the size of the guarantee code is eight bytes, the size of the extended logical block becomes 520 bytes. The lowest common multiple of 512 bytes and 520 bytes is 33280 bytes. Respectively appending 8-byte guarantee codes to each of 64 logical blocks received from the host computer makes the overall data size 33280 bytes. This value corresponds to the size of 65 logical blocks (33280=512×65).
In this case, the two ends of the data configured from 64 extended logical blocks matches up with the two ends of the 65 logical blocks. Therefore, the 64 extended logical blocks can be stored in the disk drive as 65 logical blocks. For convenience sake, in this specification, for example, the method for reading and writing data at the size of the lowest common multiple of the logical block size and the extended logical block size will be called lowest-common-multiple-unit data access.
A process, which reads out old data stored in a storage device, merges this old data with new data, and thereafter, rewrites the merged data back to the storage device, will be called a read-modify-write process.
Now then, when the host computer is a mainframe, the mainframe manages data in units called tracks. One track, for example, is constituted from either 96 or 116 logical blocks.
When a logical block targeted for updating exists in the anterior area of a track, from the lead block to the 64th logical block of the track, a read-modify-write process can be carried out using lowest-common-multiple-unit data access. However, when the update-targeted logical block exists in the posterior area of the track beyond the 65th logical block, using lowest-common-multiple-unit data access results in processing being carried out across two tracks. In this case, data corresponding to the logical blocks from the 65th block to the 128th block must be read out from the storage device. However, the 117th through the 128th logical blocks constitute a different track.
Accordingly, when the update-targeted block location exists in the track posterior area, it is necessary to carry out processing that spans a plurality of adjacent tracks. When a read process or a write process is carried out for the other track adjacent to the track comprising the update-targeted block, it is not immediately possible to read out the data required for updating, raising the likelihood of wait time occurring. The occurrence of wait time lowers the throughput of the storage controller.
Furthermore, since a cache area for receiving the data of the adjacent other track must be secured, twice as much cache memory is needed. This reduces the cache hit ratio, and lowers the storage controller throughput.